<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>RTTNode - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Node.html">Node</a> → <a href="InputNode.html">InputNode</a> → <a href="UniformNode.html">UniformNode</a> → <a href="TextureNode.html">TextureNode</a> → </p>
	<h1 translate="no">RTTNode</h1>
		<section>
			<header>
				<div class="class-description"><p><code>RTTNode</code> takes another node and uses it with a <code>QuadMesh</code> to render into a texture (RTT).
This module is especially relevant in context of post processing where certain nodes require
texture input for their effects. With the helper function <code>convertToTexture()</code> which is based
on this module, the node system can automatically ensure texture input if required.</p></div>
			</header>
			<article>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="RTTNode" translate="no">new <a href="#RTTNode">RTTNode</a><span class="signature">( node : <span class="param-type"><a href="Node.html">Node</a></span>, width : <span class="param-type">number</span>, height : <span class="param-type">number</span>, options : <span class="param-type">Object</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new RTT node.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>node</strong>
									</td>
									<td class="description last">
										<p>The node to render a texture with.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>width</strong>
									</td>
									<td class="description last">
										<p>The width of the internal render target. If not width is applied, the render target is automatically resized.</p>
										<p>Default is <code>null</code>.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>height</strong>
									</td>
									<td class="description last">
										<p>The height of the internal render target.</p>
										<p>Default is <code>null</code>.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>options</strong>
									</td>
									<td class="description last">
										<p>The options for the internal render target.</p>
										<p>Default is <code>{type:HalfFloatType}</code>.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="autoResize" translate="no">.<a href="#autoResize">autoResize</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
					<div class="description">
						<p>Whether the internal render target should automatically be resized or not.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="autoUpdate" translate="no">.<a href="#autoUpdate">autoUpdate</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>Whether the texture should automatically be updated or not.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="height" translate="no">.<a href="#height">height</a><span class="type-signature"> : number</span> </h3>
					<div class="description">
						<p>The height of the internal render target.</p>
						<p>Default is <code>null</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="isRTTNode" translate="no">.<a href="#isRTTNode">isRTTNode</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
					<div class="description">
						<p>This flag can be used for type testing.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="node" translate="no">.<a href="#node">node</a><span class="type-signature"> : <a href="Node.html">Node</a></span> </h3>
					<div class="description">
						<p>The node to render a texture with.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="pixelRatio" translate="no">.<a href="#pixelRatio">pixelRatio</a><span class="type-signature"> : number</span> </h3>
					<div class="description">
						<p>The pixel ratio</p>
						<p>Default is <code>1</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="renderTarget" translate="no">.<a href="#renderTarget">renderTarget</a><span class="type-signature"> : <a href="RenderTarget.html">RenderTarget</a></span> </h3>
					<div class="description">
						<p>The render target</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="textureNeedsUpdate" translate="no">.<a href="#textureNeedsUpdate">textureNeedsUpdate</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>Whether the texture requires an update or not.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="updateBeforeType" translate="no">.<a href="#updateBeforeType">updateBeforeType</a><span class="type-signature"> : string</span> </h3>
					<div class="description">
						<p>The <code>updateBeforeType</code> is set to <code>NodeUpdateType.RENDER</code> since the node updates
the texture once per render in its <a href="RTTNode.html#updateBefore">RTTNode#updateBefore</a> method.</p>
						<p>Default is <code>'render'</code>.</p>
					</div>
						<dl class="details">
							<dt class="tag-overrides"><strong>Overrides:</strong> <a href="TextureNode.html#updateBeforeType">TextureNode#updateBeforeType</a></dt>
						</dl>
				</div>
				<div class="member">
					<h3 class="name" id="width" translate="no">.<a href="#width">width</a><span class="type-signature"> : number</span> </h3>
					<div class="description">
						<p>The width of the internal render target.
If not width is applied, the render target is automatically resized.</p>
						<p>Default is <code>null</code>.</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="setPixelRatio" translate="no">.<a href="#setPixelRatio">setPixelRatio</a><span class="signature">( pixelRatio : <span class="param-type">number</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Sets the pixel ratio. This will also resize the render target.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>pixelRatio</strong>
									</td>
									<td class="description last">
										<p>The pixel ratio to set.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="setSize" translate="no">.<a href="#setSize">setSize</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Sets the size of the internal render target</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>width</strong>
									</td>
									<td class="description last">
										<p>The width to set.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>height</strong>
									</td>
									<td class="description last">
										<p>The width to set.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/src/nodes/utils/RTTNode.js" translate="no" target="_blank" rel="noopener">src/nodes/utils/RTTNode.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>